<?php

class AddressTemplate extends TTemplateControl
{
	public function __construct()
	{
		parent::__construct();
		
	}
	
	public function onLoad($params)
	{
		parent::onLoad($params);
		
	}
	
	public function setValidationGroup($validationGroup)
	{
		$this->setViewState('validation_group', $validationGroup);
	}
	
	public function getValidationGroup()
	{
		$this->getViewState('validation_group', 'address_validation');
	}
	
	public function clearForm()
	{
		$this->country->Text = '';
		$this->city->Text = '';
		$this->postal_code->Text = '';
		$this->street->Text = '';
		$this->number->Text = '';
		$this->description->Text = '';
	}
	
	public function getCountry() {
		$this->ensureChildControls();
		return $this->getRegisteredObject('country');
	}
	
	public function getCity() {
		$this->ensureChildControls();
		return $this->getRegisteredObject('city');
	}
	
	public function getPostalCode() {
		$this->ensureChildControls();
		return $this->getRegisteredObject('postal_code');
	}
	
	public function getStreet() {
		$this->ensureChildControls();
		return $this->getRegisteredObject('street');
	}
	
	public function getNumber() {
		$this->ensureChildControls();
		return $this->getRegisteredObject('number');
	}
	
	public function getDescription() {
		$this->ensureChildControls();
		return $this->getRegisteredObject('description');
	}
}

?>